﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Formsy.Data.Interfaces;
using Formsy.Data.Linq;

namespace Formsy.Data.Services
{
    public class HttpDataService
    {
        protected static HttpDataService m_HttpDataService = new HttpDataService();
        protected FormsyDataContext m_Db = new FormsyDataContext();

        #region Service Definitions
        protected IFormsyService m_FormsyService;

        
        #endregion


        protected HttpDataService() 
        {
            m_FormsyService = new FormsyService(m_Db);
        }
        

        public static HttpDataService Instance
        {
            get
            {
                if (m_HttpDataService == null)
                    m_HttpDataService = new HttpDataService();

                return m_HttpDataService;
            }
        }


        #region Exposed Services
        public IFormsyService FormsyService 
        {
            get 
            {
                return m_FormsyService;
            }
        }


       
        #endregion

    }
}
